home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
v7n20.arc
/
ENV720.ARC
/
FIGURE7.C
< prev
next >
Wrap
Text File
|
1988-10-29
|
874b
|
26 lines
VOID DrawIt (HPS hps, SHORT cxClient, SHORT cyClient)
{
POINTL ptl ;
GpiSetPattern (hps, 1L + rand() % 16) ; // Pattern = 1 to 16
GpiSetColor (hps, (LONG) (rand() % 16)) ; // Color = 0 to 15
GpiSetBackColor (hps, (LONG) (rand () % 16)) ; // Background color
GpiSetBackMix (hps, BM_OVERPAINT) ; // Background mix
GpiBeginArea (hps, BA_NOBOUNDARY) ;
ptl.x = rand() % cxClient ; // First corner
ptl.y = rand() % cyClient ;
GpiMove (hps, &ptl) ;
ptl.x = rand() % cxClient ; // Second corner
ptl.y = rand() % cyClient ;
GpiLine (hps, &ptl) ;
ptl.x = rand() % cxClient ; // Third corner
ptl.y = rand() % cyClient ;
GpiLine (hps, &ptl) ;
GpiEndArea (hps) ;
}